package com.keyboardr.gamerater;

import java.util.Comparator;

public class RatingComparator<T extends Player> implements Comparator<T> {

	@Override
	public int compare(T paramT1, T paramT2) {
		double tbr = paramT1.getRating() - paramT2.getRating();
		return (int) ((tbr == 0)?new NameComparator<T>(false).compare(paramT1, paramT2):-tbr);
	}

}
